package net.lb.io.json;

import com.jfire.json.JsonObject;
import com.jfire.json.JsonUtil;

public class Type
{
    private Integer code;
    private String  name;
    
    public Integer getCode()
    {
        return code;
    }
    
    public void setCode(Integer code)
    {
        this.code = code;
    }
    
    public String getName()
    {
        return name;
    }
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public static void main(String args[])
    {
        String str = "{\"code\":12,\r\n\"name\":\"linbin\"}";
        System.out.println(str);
        JsonObject jsonObject = (JsonObject) JsonUtil.fromString(str);
        System.out.println(jsonObject.getInteger("code"));
        System.out.println(jsonObject.getString("name"));
    }
}
